package cn.edu.sjtu.software.sjtucontacts.util;

import cn.edu.sjtu.software.sjtucontacts.model.Preference;
import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

public class BasicContactItem extends LinearLayout{

	private TextView type;
	private TextView value;
	
	public BasicContactItem(Context context) {
		super(context);
		this.setOrientation(LinearLayout.VERTICAL);
		this.setPadding(10, 0, 10, 0);
		type = new TextView(context);
		type.setTextSize(20);
		type.setTextColor(Preference.getInstance().getFontColorOfName());
		value = new TextView(context);
		value.setTextColor(Preference.getInstance().getFontColorOfName());
		this.addView(type);
		this.addView(value);
	}
	
	public void setType(String type){
		this.type.setText(type);
	}
	
	public String getType(){
		return type.getText().toString();
	}

	public void setValue(String value){
		this.value.setText(value);
	}
	
	public String getValue(){
		return value.getText().toString();
	}
}
